#ifndef __WED_MUTEX_H__
#define __WED_MUTEX_H__

#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <Wed_framework_config.h>
#include "../Wed_errno.h"

/* \brief 互斥锁结构体 */
struct Wed_mutex {

};

/**
 * \brief 互斥锁初始化
 *
 * @param p_mutex 要初始化的互斥锁
 *
 * @return 成功返回 0
 */
int Wed_mutex_init(struct Wed_mutex *p_mutex);
struct Wed_mutex *Wed_mutex_create(void);
/**
 * \brief 互斥锁上锁
 *
 * @param p_mutex  要上锁的互斥锁
 * @param time_out 等待锁超时时间
 *
 * @return 成功返回 0
 */
int Wed_mutex_lock(struct Wed_mutex *p_mutex, uint32_t time_out);
/**
 * \brief 互斥锁解锁
 *
 * @param p_mutex  要解锁的互斥锁
 *
 * @return 成功返回 0
 */
int Wed_mutex_unlock(struct Wed_mutex *p_mutex);
#endif
